package com.chen.solution.rpc.account.api.dto;

import com.chen.solution.rpc.commonlib.validation.PhoneNumber;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.Instant;

/**
 * 用户账户信息
 * @author ChenTian
 * @date 2022/4/10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class AccountDto {
    @NotBlank
    private String id;
    /** 名称 */
    private String name;
    /** 邮件 */
    @Email(message = "Invalid email")
    private String email;
    /** 账户是否已激活 */
    private boolean confirmedAndActive;
    /** 账户注册时间 */
    @NotNull
    private Instant memberSince;
    /** 是否是管理员 */
    private boolean support;
    /** 联系电话 */
    @PhoneNumber
    private String phoneNumber;
    /** 头像图片地址 */
    private String photoUrl;
}
